package trash.Test;


public class ArrayTest
{
    public static void main(String[] args)
    {
        int[] arr1 = new int[2]; //default values = 0
        printArray(arr1);

        arr1[0] = 9000;
        arr1[1] = 100500;

        int [] arr2 = arr1.clone();
        printArray(arr2);

        int [] arr3 = {1, 2, 3};
        printArray(arr3);

        int[] arr4 = new int[]{10, 20, 30, 40, 50};
        printArray(arr4);

        printArray(new int[]{100,200});
    }

    private static void printArray(int[] arr)
    {
        System.out.println("length = " + arr.length);
        for (int x : arr)
            System.out.println(x);
    }
}
